#include "VariableTable.h"
//#include <string>
#include <iostream>

using namespace std;

VarTable::VarTable(void)
{
	//this->varName = varName;
}

_variableIndex VarTable::insertVar(_variableName varName)
{
	for(unsigned int i=0;i<varTuple.size();i++)
	{
		if(varTuple.at(i)==varName)
		{
			return i;
		}
	}
	varTuple.push_back(varName);
	varCount++;
	return varTuple.size()-1;
}
int VarTable::getSize()
{
	int count = 0;

	for(varIter = varTuple.begin(); varIter != varTuple.end(); ++varIter)
		count++;

	return count;
}
_variableName VarTable::getVarN(_variableIndex varIndex)
{
	return varTuple.at(varIndex);
}
_variableIndex VarTable::getVarI(_variableName varName)
{
	_variableIndex count = 0;
	for(varIter = varTuple.begin(); varIter != varTuple.end(); ++varIter)
	{
		if(*varIter == varName)
			return count;

		count++;
	}
}
/*
//Query
_variableIndex VarTable::getVarIndex(_variableName varName)
{

}
_variableName VarTable::getVarName(_variableIndex varIndex)
{
}
vector<_variableName> VarTable::getAllVar()
{
}*/